﻿@using Course.Models
<html>
<head>
    <title>后台</title>
        <link media="all" type="text/css" href="@Url.Content("../Content/Styles/BackHomePage.css")" rel="stylesheet" />
    <script src="../../tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-treeview.js")" type="text/javascript"></script>
     <script charset="utf-8" src="../../editor/kindeditor.js"></script>
<script type="text/javascript">
    KE.show({
        id: 'editor_id',
        imageUploadJson: '/UpImage/UploadImage'


    });
</script>
</head>
<body>
    @{
        Article article = ViewData["one"] as Article;
        List<SelectListItem> items = new List<SelectListItem>();
        IQueryable<Category> categories = ViewData["categories"] as IQueryable<Category>;

        foreach (var category in categories)
        {
            SelectListItem item = new SelectListItem();
            item.Text = category.CName;
            item.Value = category.CategoryID.ToString();

            if (category.CategoryID == article.CategoryID)
            {
                item.Selected = true;
            }

            items.Add(item);
        }
        }

        <div id="body-wrapper">
            @RenderPage("../Shared/BackLeft.cshtml")
                <form action="ArticleEdit" method="post">
            @*<div id="main-contents">
                <!-- Main Content Section with everything -->
                <noscript>
                    <!-- Show a notification if the user has disabled javascript -->
                    <div class="notification error png_bg">
                        <div>
                            Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/"
                                title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852"
                                    title="Enable Javascript in your browser">enable</a> Javascript to navigate
                            the interface properly. Download From <a href="http://www.exet.tk">exet.tk</a></div>
                    </div>
                </noscript>
                @Html.Label("标题")
                <input type="text" name="Title" value="@article.ATitle" />
                @Html.Label("作者")
                <input type="text" name="Author" value="@article.Author" />
                @Html.Label("分类")
                @Html.DropDownList("category", items)
                @Html.Label("顺序")
                <input type="text" name="OrderNum" value="@article.OrderNum" />
                <div>
    
                    <textarea id="elm2" name="elm2" rows="15" cols="80" style="width: 80%">     @article.AContent
	</textarea>
                </div>
                <input type="submit" value="确认修改" />
                <input type="hidden" value="@article.ArticleID" name="ID" />
            </div>*@

            <div id="main-contents">
                <!-- Main Content Section with everything -->
                <noscript>
                    <!-- Show a notification if the user has disabled javascript -->
                    <div class="notification error png_bg">
                        <div>
                            Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/"
                                title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852"
                                    title="Enable Javascript in your browser">enable</a> Javascript to navigate
                            the interface properly. Download From <a href="http://www.exet.tk">exet.tk</a></div>
                    </div>
                </noscript>
                <div class="content-box">
                    <!-- Start Content Box -->
                    <div class="content-box-header">
                        <h3>
                            文章</h3>
 
                        <div class="clear">
                        </div>
                    </div>
                    <!-- End .content-box-header -->
                    <div class="content-box-content">
                        <div class="tab-content default-tab" id="tab1">
                            <!-- This is the target div. id must match the href of this div's tab -->
                            <div class="notification attention png_bg">
                                <a href="#" class="close">
                                    <img src="@Url.Content("~/Content/Images/icons/cross_grey_small.png")" title="Close this notification" alt="close" /></a>
                                <div>
                                    添加内容时注意格式
                                </div>
                            </div>
                @Html.Label("标题")
                <input type="text" name="Title" value="@article.ATitle" />
                @Html.Label("作者")
                <input type="text" name="Author" value="@article.Author" />
                @Html.Label("分类")
                @Html.DropDownList("category", items)
                @Html.Label("顺序")
                <input type="text" name="OrderNum" value="@article.OrderNum" />
                <div>
    
                      <textarea id="editor_id" name="editor" style="width:700px;height:300px;">@article.AContent</textarea>
                </div>
                <input type="submit" value="确认修改" />
                <input type="hidden" value="@article.ArticleID" name="ID" />
            </div>
            </div>
            </div>
            </div>
            </form>
        </div>
 
</body>
</html>
